

<?php
//百度 单个和全部的
include_once 'all.class.php';
$canshu="shareid=333046&uk=841870699";
$wangzhi="http://pan.baidu.com/share/link?".$canshu;
$file=file_get_contents($wangzhi);
/*$ch = curl_init();
		curl_setopt($ch, CURLOPT_URL, "$url");
		curl_setopt($ch, CURLOPT_HTTPHEADER, array("X-FORWARDED-FOR:$iipp", "CLIENT-IP:$iipp"));  //构造IP
		curl_setopt($ch, CURLOPT_REFERER,$iipp);   //构造来路
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
		$file = curl_exec($ch);
		
		
		curl_close($ch);//最后一步关闭连接
		*////ip地址欺骗

//echo $file;
$pattern='{www.baidupcs.com(.*?)sh=1\\\"}i';
preg_match_all($pattern,$file,$result,PREG_SET_ORDER );	
var_dump($result);
$temp0=$result[0][0];
$temp1=$result[1][0];


if (strcasecmp($temp0,$temp1)==0)//两者相等返回0
		{
		$tempurl=$result[0][0];
			//echo $tempurl."<br>";
			$fileurlt=str_replace("\\\/","/",$tempurl);
			//echo $fileurlt;
			$fileurl=$fileurlt;          //str_replace("2","43",$fileurlt);
			//echo $fileurl

			wjdz($fileurl);
		}else {
				echo "dsfdsgfdsgsgsg";
		for($i=0;$result[$i][0]!=NULL;$i++)
				{
				$tempurl=$result[$i][0];
			//echo $tempurl."<br>";
			$fileurlt=str_replace("\\\/","/",$tempurl);
			echo $fileurlt;
			$fileurl="http://".$fileurlt;          //str_replace("2","43",$fileurlt);
			echo $fileurl;
			wjdz($fileurl);
			//header("location:$fileurl");
} 
			

		}
//百度单个的
$canshu="shareid=190724&uk=3022536317";
if($canshu=="")
 {
 die("文件不存在");
 }
else
{
$wangzhi="http://pan.baidu.com/share/link?".$canshu;
$file=file_get_contents($wangzhi);
$pattern='/a><a class="dbtn cancel singledbtn" href=(.*?)id="downFileButtom">/i';
preg_match_all($pattern,$file,$result);	
$tempurl=implode("",$result[1]);
$fileurlt=str_replace("\"","",$tempurl);
$fileurl=str_replace("&amp;","&",$fileurlt);
header("location:$fileurl");
}



//迅雷的

$url = "http://kuai.xunlei.com/d/279jAAIFHgD2AT9R6b3"; 
$file = file_get_contents($url);
//echo $file;
$pattern='/file_url=(.*?) file/';
preg_match_all($pattern,$file,$result);
$tempurl=implode("",$result[1]);
$fileurlt=str_replace("\"","",$tempurl);
$fileurl=str_replace("&amp;","&",$fileurlt);
header("location:$fileurl");
	http:\\/\\/www.baidupcs.com  